angular.module('imsApp').controller('logController', ['$scope','SystemManager','$state', function ($scope,SystemManager,$state) {
  $scope.search={pageNo:$state.params.pageNo||1,pageSize:$state.params.pageSize||10}
  $scope.paginationConf = {
    currentPage: $state.params.pageNo || 1,
    itemsPerPage: $state.params.pageSize || 10,
    pagesLength: 9,
    search: 0,
    onChange: function () {
      $scope.search.pageNo = this.currentPage;
      $scope.search.pageSize = this.itemsPerPage;
      $state.go($state.current.name, $scope.search)

    }
  };
  SystemManager.logList([$scope.search.pageNo,$scope.search.pageSize]).then(function (result) {
    $scope.list=result.data.pageList;
    $scope.paginationConf.totalItems=result.data.total;
  })


}])

